From d58aa65937c94fc1bfa82c8135730d4aba18a8a4 Mon Sep 17 00:00:00 2001 From: robertl Date: Mon, 18 Aug 2003 18:09:22 +0000 Subject: [PATCH] Do the magellan cache icon thing for mapsend, too. (Why didn't I commit this a year ago?) --- gpsbabel/mapsend.c | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/gpsbabel/mapsend.c b/gpsbabel/mapsend.c index eb89e72c6..d1aafdc7d 100644 --- a/gpsbabel/mapsend.c +++ b/gpsbabel/mapsend.c @@ -396,7 +396,7 @@ mapsend_waypt_pr(const waypoint *waypointp) double flong; double flat; static int cnt = 0; - const char *iconp; + const char *iconp = NULL; const char *sn = global_opts.synthesize_shortnames ? mkshort(mkshort_handle, waypointp->description) : waypointp->shortname; @@ -428,6 +428,15 @@ mapsend_waypt_pr(const waypoint *waypointp) } else { c = 0; } + if (get_cache_icon(waypointp)) { + iconp = mag_find_token_from_descr(get_cache_icon(waypointp)); + if (1 == strlen(iconp)) { + c = iconp[0] - 'a'; + } else { + c = iconp[1] - 'a' + 26; + } + } + fwrite(&c, 1, 1, mapsend_file_out); c = 1; fwrite(&c, 1, 1, mapsend_file_out); -- 2.30.2